﻿using CodeAngel.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CodeAngel.UI
{
    /// <summary>
    /// Interaction logic for DatabaseControl.xaml
    /// </summary>
    public partial class DatabaseControl : UserControl
    {
        public DatabaseControl()
        {
            InitializeComponent();
        }


        //#region Database

        ///// <summary>
        ///// Gets or sets the Database.
        ///// </summary>
        //public Database Database
        //{
        //    get { return (Database)GetValue(DatabaseProperty); }
        //    set { SetValue(DatabaseProperty, value); }
        //}

        ///// <summary>
        ///// Using a DependencyProperty as the backing store for Database.
        ///// </summary>
        //public static readonly DependencyProperty DatabaseProperty =
        //    DependencyProperty.Register("Database", typeof(Database), typeof(DatabaseControl), new UIPropertyMetadata(null, DatabaseChangedHandler));

        ///// <summary>
        ///// Handles when the Database changes.
        ///// </summary>
        //private static void DatabaseChangedHandler(DependencyObject d, DependencyPropertyChangedEventArgs e)
        //{
        //    var ThisControl = d as DatabaseControl;
        //    if (ThisControl != null)
        //    {
        //        ThisControl.MyStackPanel.DataContext = ThisControl.Database;
        //    }
        //}

        //#endregion


        //#region UpdateCommand

        ///// <summary>
        ///// Gets or sets the UpdateCommand.
        ///// </summary>
        //public ICommand UpdateCommand
        //{
        //    get { return (ICommand)GetValue(UpdateCommandProperty); }
        //    set { SetValue(UpdateCommandProperty, value); }
        //}

        ///// <summary>
        ///// Using a DependencyProperty as the backing store for UpdateCommand.
        ///// </summary>
        //public static readonly DependencyProperty UpdateCommandProperty =
        //    DependencyProperty.Register("UpdateCommand", typeof(ICommand), typeof(DatabaseControl), new UIPropertyMetadata(null));

        //#endregion

        //private void UpdateButtonClickHandler(object sender, RoutedEventArgs e)
        //{
        //    if (this.UpdateCommand != null)
        //        this.UpdateCommand.Execute(null);

        //}

    }
}
